package com.scpii.api.persistence.ec;

import java.util.List;

import com.scpii.api.domain.ec.ShoppingCar;

public interface ShoppingCarMapper {
	
	/**
	 * 插入一条购物车记录
	 * @param car
	 * @return
	 */
	 int insert(ShoppingCar car);
	
	 /**
	  * 获取指定用户购物车的数据
	  * @param car
	  * @return
	  */
	 List<ShoppingCar> selectShoppingCarBySelective(ShoppingCar car);
	 
	 /**
	  * 根据ID来更新购物车
	  * @param car
	  * @return
	  */
	 int updateShoppingCarById(ShoppingCar car);
	 
	 /**
	  * 批量删除购物车中的数据
	  * @param carIdList
	  * @return
	  */
	 int deleteShoppingCar(List<Long> carIdList);
	 
	 /**
	  * 提交订单时,查询语句
	  * @param list
	  * @return
	  */
	 List<ShoppingCar> selectWithList(List<Long> list);
	 
	 Long generateId();
	
}